package com.xframe.domain.e3sp.bu.sale;

import com.xframe.domain.BaseModel;
import com.xframe.domain.e3sp.maindata.SparePartBaseView;
import com.xframe.domain.e3sp.maindata.domestic.Dealer;
import com.xframe.xdal.core.annotation.AutoFill;
import com.xframe.xdal.core.annotation.XBelongsTo;
import com.xframe.xdal.core.annotation.XColumn;
import com.xframe.xdal.core.annotation.XTable;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * com.xframe.domain.e3sp.bu.sale.DealerFlvalue
 * @author zjj
 * @create 2024/4/24 15:15
 */
@Data
@Accessors(chain=true)
@XTable(value = "bu_t01_dealer_flvalue", label = "经销商波动值",dataSourceCode = "warehouse")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.maindata.SparePartBaseView",foreignKey = "sparePartId", targetKey = "sparePartId",as = "refSparePartBaseView")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.maindata.domestic.Dealer",foreignKey = "dealerId", targetKey = "dealerId",as = "refDealer")
public class DealerFlvalue extends BaseModel {

    /**
     * 经销商波动值ID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "dealer_flvalue_id", primaryKeyFlag = true,desc = "经销商波动值ID")
    private Long dealerFlvalueId;

    /**
     * 经销商ID
     */
    @XColumn(name = "dealer_id", desc = "经销商ID")
    private Long dealerId;

    /**
     * 备件清单ID
     */
    @XColumn(name = "spare_part_id", desc = "备件清单ID")
    private Long sparePartId;

    /**
     * 采购数量/12周平均数
     */
    @XColumn(name = "num", desc = "12周平均数")
    private Integer num;

    /**
     * 流速代码
     */
    @XColumn(name = "lsdm", desc = "备件流速代码")
    private String lsdm;

    /**
     * SNP
     */
    @XColumn(name = "snp", desc = "SNP")
    private Integer snp;

    /**
     * 波动值
     */
    @XColumn(name = "bf_value", desc = "波动值")
    private BigDecimal bfValue;

    /**
     * 向上取整的SNP整数倍的波动值/波动上限值
     */
    @XColumn(name = "bozvalue", desc = "波动上限值")
    private Integer bozvalue;

    /**
     * 备件
     */
    private SparePartBaseView refSparePartBaseView;

    /**
     * 国内经销商
     */
    private Dealer refDealer;

}
